export default {
    namespaced: true,
    state: {
        isShowToast: false,
        toastMsg :'',
        toastType:''
    },
    getters: {
    },
    mutations: {
        changeIsShowToast(state, payload) {
            state.isShowToast = payload.show
            if (payload.show) {
                state.toastMsg =payload.msg
                state.toastType =payload.type
            }
        }
    },
    actions: {
        asyncIsShowToast(context, payload) {
            // 显示提示框
            context.commit("changeIsShowToast", payload)
            //隐藏提示框
            setTimeout(() => {
            context.commit("changeIsShowToast",{show:false})
            },1000)
        }
    },
    modules: {
    }
}